import request from '@/api/request.js'


export default {
  // 库存list
  stockList(form){
    return request({
      url:'/wStock/query/'+form.currentPage+'/'+form.pageSize,
      method:'post',
      data:{}
    })
  },

  // 库存添加
  stockAdd(form){
    return request({
      url:'/wStock/insert',
      method:'post',
      data:{
        stockName:form.stockName,
        quantity:form.quantity
      }
    })
  },


  // 库存删除
  stockDelete(stockId){
    return request({
      url:'/wStock/delete',
      method:'post',
      data:{
        stockId
      }
    })
  },


  // 库存更新
  stockUpdate(row){
    return request({
      url:'/wStock/update',
      method:'post',
      data:{
        quantity:row.quantity,
        stockId:row.stockId,
        stockName:row.stockName
      }
    })
  },

}
